<a href='https://github.com/angular/angular.js/edit/v1.8.x/docs/content/error/$compile/ctxoverride.ngdoc?message=docs(error%2Fctxoverride)%3A%20describe%20your%20change...' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this Doc</a>


<h1>Error: $compile:ctxoverride
  <div><span class='hint'>DOM Property Security Context Override</span></div>
</h1>

<div>
    <pre class="minerr-errmsg" error-display="Property context '{0}.{1}' already set to '{2}', cannot override to '{3}'.">Property context '{0}.{1}' already set to '{2}', cannot override to '{3}'.</pre>
</div>

<h2 id="description">Description</h2>
<div class="description">
  <p>This error occurs when the security context for a property is defined via <a href="api/ng/provider/$compileProvider#addPropertySecurityContext">addPropertySecurityContext()</a> multiple times under different security contexts.</p>
<p>For example:</p>
<pre><code class="lang-js">$compileProvider.addPropertySecurityContext(&quot;my-element&quot;, &quot;src&quot;, $sce.MEDIA_URL);
$compileProvider.addPropertySecurityContext(&quot;my-element&quot;, &quot;src&quot;, $sce.RESOURCE_URL);    //throws
</code></pre>

</div>


